﻿{include file="public/header" /}
<div class="tab">
    <div class="tab-head">
        <strong>{:lang('push')['send']}</strong>
        <ul class="tab-nav">
            <li {if $tab==''}class="active"{/if}><a href="?tab=">{:lang('push')['send']}</a></li>
            <li {if $tab=='list'}class="active"{/if}><a href="?tab=list">{:lang('push')['list']}</a></li>
        </ul>
    </div>
    <div class="tab-body">
        <br/>
        <div class="tab-panel {if $tab == ''}active{/if}" id="tab-send" style="float: left;margin-left: 20px">
            <form method="post" class="form-x" action="">
                <div class="form-group">
                    <div class="label">
                        <label>类型</label>
                    </div>
                    <div class="field">
                        <select name="type" class="input input-auto">
                            <option value="user">用户端</option>
                            <option value="seller">商家端</option>
                            <option value="express">配送端</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>{:lang('push')['content']}</label>
                    </div>
                    <div class="field">
                        <textarea name="message" class="input input-auto" style="min-height: 170px;min-width: 400px" data-validate="required:{:lang('currency')['required']}"></textarea>
                    </div>
                </div>
                <div class="form-button">
                    <button class="button bg-main" type="submit">推送</button>
                </div>
            </form>
        </div>
        <div class="tab-panel {if $tab == 'list'}active{/if}" id="tab-list">
            <form method="post">
                <div class="panel admin-panel">
                    <div class="panel-head"><strong>{:lang('push')['list']}</strong></div>
                    <table class="table table-hover">
                        <tr>
                            <th width="100">类型</th>
                            <th width="120">内容</th>
                            <th width="200">时间</th>
                        </tr>
                        {foreach $list as $volist}
                        <tr>
                            <td style="line-height:40px">{if $volist.type == 'user'}用户端{elseif $volist.type == 'seller'}商家端{else}配送端{/if}</td>
                            <td style="line-height:40px">{$volist.message}</td>
                            <td style="line-height:40px">{$volist.time|date="Y-m-d H:i:s",###}</td>
                        </tr>
                        {/foreach}
                    </table>
                    {include file="public/pages" /}
                </div>
            </form>
        </div>
    </div>
</div>
{include file="public/footer" /}